﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HolidayDataAccessLayer
{
    public static class Extensions
    {
        public static Destination Clone(this Destination d)
        {
            Destination newDest = new Destination();
            newDest.DestinationId = d.DestinationId;
            newDest.DestinationName = d.DestinationName;
            newDest.BoardId = d.BoardId;
            newDest.EndDate = d.EndDate;
            newDest.Price = d.Price;
            newDest.ReferenceNumber = d.ReferenceNumber;
            newDest.StartDate = d.StartDate;
            return newDest;
        }

        public static Reservation Clone(this Reservation r)
        {
            Reservation newRes = new Reservation();
            newRes.DestinationId = r.DestinationId;
            newRes.Notes = r.Notes;
            newRes.PaymentStatus = r.PaymentStatus;
            newRes.ReferenceNumber = r.ReferenceNumber;
            newRes.ReservationId = r.ReservationId;
            newRes.TotalPrice = r.TotalPrice;
            return newRes;
        }
    }
}
